package com.example.productservice.service;

import com.example.productservice.bean.Product;
import com.example.productservice.dao.ProductDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductService {
    @Resource
    private ProductDao dao;

    public List<Product> findAll() { return dao.findAll(); }
    public Product findById(Long id) { return dao.findById(id); }
    public int createProduct(Product product) { return dao.insert(product); }
}